<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta charset="utf-8">
	<title>后台用户管理</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<link rel="stylesheet" href="../layui/css/layui.css" media="all">
	<style>
		.blogUser-con .layui-table-view {
			border: none;
		}
		
		.blogUser-con .layui-table-box {
			margin-top: 10px;
		}
		
		.blogUser-con {
			padding: 0 15px 15px 15px;
			margin-bottom:50px;
		}
		.blogUser-con  .layui-table-tool-self{
			display:none;
		}
		.blogUser-con .not_border_left {
			border-left: none !important;
		}
		
		.blogUser-con .blogUser dl dd.layui-this {
			background-color: #1E9FFF !important;
		}
		
		.blogUser-con .hide {
			display: none;
		}
		
		.blogUser-con .show {
			display: block;
		}
		
		.blogUser-con .btn_size {
			height: 28px !important;
			line-height: 28px !important;
		}
		
		.blogUser-con .layui-table-body table tbody .layui-table-hover {
			background: #fffdd3 !important;
		}
		
		.blogUser-con .layui-table-body table tbody .layui-table-click {
			background: #fdef9b !important;
		}
		
		.blogUser-con .layui-table, .layui-table-view {
			border: none;
			margin-top: 0;
		}
		
		#add-blogUser {
			display: none;
			z-index: 999 !important;
		}
		
		#add-blogUser .artTypeLayer {
			width: 90%;
			margin-left: auto;
			margin-right: auto;
			padding-top: 20px;
		}
		.adminuserdetail{
			padding:20px;
			display: none;
		}
		.adminuserdetail table tr td{
			padding: 15px;text-align: center;
		}
		.adminuserdetail .tdbck{
			background: #f2f2f2;
			width: 30%;
		}
	</style>
</head>
<body>

	<div class="blogUser-con">
		<blockquote class="layui-elem-quote not_border_left">
			<form class="layui-form" action="">
				<div class="layui-inline">
	     	   		<select id="usertype">
						  <option value="0">请选择操作方式</option>
						  <option value="add">add</option>
						  <option value="delete">delete</option>
						  <option value="modify">modify</option>
					</select> 
			    </div>
			  	<div class="layui-input-inline">
					<input type="text" name="opermethod" id="opermethod" placeholder="请输入操作的系统方法" class="layui-input" autocomplete="off">
			    </div>
			    <div class="layui-input-inline">
					<input type="text" name="userName" id="userName" placeholder="请输入操作的用户名" class="layui-input" autocomplete="off">
			    </div>
			    <span class="layui-input-inline">操作时间：</span> 
				<div class="layui-input-inline">
					
					<input type="text" name="starttime"
						id="starttime" placeholder="yyyy-MM-dd" class="layui-input"
						autocomplete="off">
				</div>
				<span class="layui-input-inline">--</span> 
				<div class="layui-input-inline">
					 <input type="text" name="endtime" id="endtime"
						placeholder="yyyy-MM-dd" class="layui-input" autocomplete="off">
				</div>
			    <div class="layui-inline">
	     	   		<button id="btnselfrontinfo" type="button" class="layui-btn layui-bg-blue">查询</button>
			    </div>
				
			</form>
		</blockquote>

		<!-- 表格开始 -->
		<table class="layui-hide" name="systemlog" id="systemlog" lay-filter="systemlog"></table>
		<!-- 表格结束 -->
		
	</div>
	<script src="../js/jquery-3.3.1.js" type="text/javascript"></script>
	<script src="../layui/layui.js" charset="utf-8"></script>
	<script src="../js/loadselect.js" charset="utf-8"></script>
	<script>
	layui.use([ 'table', 'form', 'layer',  'laytpl', 'element','laydate' ], function() {
		var table = layui.table, form = layui.form, 
			layer = layui.layer, $ = layui.jquery,
			element = layui.element,laydate=layui.laydate;
		laydate.render({
   			 	elem: '#starttime'
 			 });
 			 laydate.render({
   			 	elem: '#endtime'
 			 });
	
		/*加载表格*/
		table.render({
			elem : '#systemlog',
			id:'systemlog',
			url : '../getlog',
			title : '后台用户数据表',
			height: "full-160",
			skin : 'line',
			even : true,
			cols : [ 
			     [ {
					type : 'numbers',
					title : 'ID',
					align : 'center',
					width : 80
				},{
					field : 'opertype',
					align : 'center',
					title : '操作类型',
				}, {
					field : 'description',
					align : 'center',
					title : '描述',
				}, {
					field : 'opermethod',
					title : '操作方法',
					align : 'center'
				},{
					field : 'params',
					align : 'center',
					title : '操作参数'
				},{
					field : 'createdate',
					align : 'center',
					title : '执行时间'
				},{
					field : 'createby',
					align : 'center',
					title : '执行人'
				}] 
			 ],
			 page: {
					layout: ['prev', 'page', 'next', 'skip', 'count', 'limit'],
					groups: 5,
					limit: 10,
					limits: [1,2,4,10, 20, 30, 40, 50],
					theme: '#1E9FFF',						
			 },
		});	
		/* 点击查询对网站用户进行筛选 */
		$("#btnselfrontinfo").click(function() {
			table.reload('systemlog', {
				method : 'post',
				where : {
					'username' : $("#userName").val().trim(),
					'opermethod':$("#opermethod").val().trim(),
					'starttime':$("#starttime").val().trim(),
					'endtime':$("#endtime").val().trim(),
					'roleid':$("#usertype").val()
						},
				page : {
					curr : 1
					}
			});
		})
		
		/*加载操作类型
		$(function() {
			$.ajax({
				url : "../getopertype",
				type : "POST",
				data : null,
				dataType : 'json',
				contentType : 'application/json;charset=UTF-8',//contentType 很重要
				success : function(e) {
					//alert(e.msg+"\n"+e.flag+"\n"+ JSON.stringify(e));
					//alert(e.resultoObject[1]);
					var s = $("#usertype").html();
					var str = "<option value=''>请选择日志操作类型</option>";
					for(var i=0;i<e.resultoObject.length;i++){
						str += "<option value="+e.resultoObject[i]+">"+e.resultoObject[i]+"</option>"
					}
					$("#usertype").append(str);
					form.render("select");
				},
				error : function(e) {
					alert("error:"+e.msg);
				}
	
			})
		})*/
	});
	</script>
</body>
</html>